var xtMonitorMemWinDetail;
var xtMonitorMemFormDetail;
function detailXtMonitorMem(){
	var record = grid.getSelectionModel().selected;
	if(record.length == 0){
		msgTishi('请选择要查看明细的项！');
		return;
	}
	initXtMonitorMemFormDetail();
	xtMonitorMemWinDetail = Ext.create('Ext.Window',{
		layout:'fit',
		width:800,
		height:400,
		maximizable:true,
		minimizable:true,
		animateTarget:document.body,
		plain:true,
		modal:true,
		title:'明细信息',
		listeners:{
			minimize:function(win,opts){
				if(!win.collapse()){
					win.collapse();
				}else{
					win.expand();
				}
			}
		},
		items:xtMonitorMemFormDetail,
		buttons:[{
			text:'关闭',
			itemId:'close',
			handler:function(button){
				button.up('window').close();
			}
		}]
	});
	xtMonitorMemWinDetail.show();
	loadFormData(xtMonitorMemFormDetail,'../xtMonitorMemController/getXtMonitorMemById?xt_monitor_mem_id='+ record.items[0].data.xt_monitor_mem_id);
}
function initXtMonitorMemFormDetail(){
	xtMonitorMemFormDetail = Ext.create('Ext.FormPanel',{
		xtype:'form',
		waitMsgTarget:true,
		defaultType:'textfield',
		autoScroll:true,
		fieldDefaults:{
			labelWidth:70,
			labelAlign:'top',
			flex:1,
			readOnly:true,
			margin:'2 5 4 5'
		},
		items:[
		{
			fieldLabel:'内存ID',
			xtype:'textfield',
			hidden:true,
			name:'xt_monitor_mem_id',
			allowBlank:false,
			maxLength:32,
			anchor:'40%'
		},
		{
			fieldLabel:'总内存（M）',
			xtype:'textfield',
			name:'xt_monitor_memTotal',
			maxLength:50,
			anchor:'40%'
		},
		{
			fieldLabel:'当前内存使用量（M）',
			xtype:'textfield',
			name:'xt_monitor_memCurrUse',
			maxLength:50,
			anchor:'40%'
		},
		{
			fieldLabel:'当前内存剩余量（M）',
			xtype:'textfield',
			name:'xt_monitor_memCurrSy',
			maxLength:50,
			anchor:'40%'
		},
		{
			fieldLabel:'交换区总量（M）',
			xtype:'textfield',
			name:'xt_monitor_memJhTotal',
			maxLength:50,
			anchor:'40%'
		},
		{
			fieldLabel:'当前交换区使用量（M）',
			xtype:'textfield',
			name:'xt_monitor_memJhCurrUse',
			maxLength:50,
			anchor:'40%'
		},
		{
			fieldLabel:'当前交换区剩余量（M）',
			xtype:'textfield',
			name:'xt_monitor_memJhSy',
			maxLength:50,
			anchor:'40%'
		},
		{
			fieldLabel:'取读时间',
			xtype:'textfield',
			name:'xt_monitor_memTime',
			maxLength:20,
			anchor:'40%'
		}
		]
	});
}
